<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ut="http://xml.netbeans.org/schema/userdetails" exclude-result-prefixes="ut" version="1.0">
    <xsl:output method="html"/>
    <xsl:param name="type" select="'adminview'"/>
    <xsl:param name="userdetailid" select="0"/>
    <xsl:template match="/">
        <xsl:if test="$type='adminview'">
            <xsl:call-template name="adminview"/>
        </xsl:if>
        
    </xsl:template>
    <xsl:template name="adminview">
        <xsl:variable name="userdetail" select="ut:UserDetails/ut:UserDetail[ut:Id=$userdetailid]"/>
        <h3>User Information</h3>
        <br/>
        <table border="1" class="table table-hover">
            <tbody>
                <tr>
                    <td><b>Name</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:Name"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>Lastname:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:Lastname"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>Email:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:Email"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>Province:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:Province"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>District:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:District"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>Address:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:Address"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td><b>PhoneNum:</b></td>
                    <td>
                        <div>
                            <xsl:value-of select="$userdetail/ut:PhoneNum"/>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </xsl:template>
</xsl:stylesheet>
